import { axios } from '@/utils/request'
export function classList(params) {
  return axios({
    url: '/school/classes',
    method: 'post',
    data: params
  })
}
export function classexport(params) {
  return axios({
    url: 'school/classes/export',
    params:params,
    method: 'get'
  })
}
//导入班级模板
export function classexporttemplate(params) {
  return axios({
    url: '/school/students/download-class-template',
    method: 'post',
    data: params,
    responseType: 'blob'
  })
}
export function classExcelIn(params) {  //导入潜在学员
  return axios({
    url: '/school/classes/import',
    method: 'post',
    data: params
  })
}
export function classInfo(id) {
  return axios({
    url: '/school/classes/' + id,
    method: 'post',
  })
}
export function classDel(id) {
  return axios({
    url: '/school/classes/' + id + '/delete',
    method: 'post',
  })
}
export function classChange(params, id) {
  return axios({
    url: '/school/classes/' + id + '/update',
    method: 'post',
    data: params
  })
}

export function classifyList(params) {  //班级分类列表
  return axios({
    url: '/school/class-categories',
    method: 'post',
    data: params
  })
}
export function addClassify(params) {
  return axios({
    url: '/school/class-categories/batch-add',
    method: 'post',
    data: params
  })
}
export function changeClassifyType(params, id) {
  return axios({
    url: '/school/class-categories/' + id + '/enable-status',
    method: 'post',
    data: params
  })
}

export function delClassify(id) {
  return axios({
    url: '/school/class-categories/' + id + '/delete',
    method: 'post',
  })
}
export function changeClassify(params, id) {
  return axios({
    url: '/school/class-categories/' + id + '/update',
    method: 'post',
    data: params
  })
}
export function endClass(params) {
  return axios({
    url: '/school/classes/finish',
    method: 'post',
    data: params
  })
}



export function classCreate(params) {
  return axios({
    url: '/school/classes/create',
    method: 'post',
    data: params
  })
}

//   export function changeTeacherType(params, id) {
//     return axios({
//       url: '/school/teachers/' + id + '/enable-status',
//       method: 'post',
//       data: params
//     })
//   }


// 班级详情排课
export function scheduleCreate(params) {
  return axios({
    url: '/school/class-schedules/create',
    method: 'post',
    data: params
  })
}
export function scheduleDel(params) {
  return axios({
    url: '/school/class-schedules/batch-delete',
    method: 'post',
    data: params
  })
}
export function scheduleInfo(id) {
  return axios({
    url: '/school/class-schedules/' + id,
    method: 'post',
  })
}
export function scheduleEdit(params, id) {
  return axios({
    url: '/school/class-schedules/' + id + '/update',
    method: 'post',
    data: params
  })
}
export function scheduleList(params) {
  return axios({
    url: '/school/class-schedules',
    method: 'post',
    data: params
  })
}

export function studentInClass(params, id) {
  return axios({
    url: '/school/classes/' + id + '/student-list',
    method: 'post',
    data: params
  })
}

export async function studentInClassAwait(params, id) {
  return await axios({
    url: '/school/classes/' + id + '/student-list',
    method: 'post',
    data: params
  })
}

export async function defaultCallStudent(params, id) {
  return await axios({
    url: '/school/call-records/' + id + '/default-call-student',
    method: 'post',
    data: params
  })
}

export function createRollCall(params) {
  return axios({
    url: '/school/call-records/create',
    method: 'post',
    data: params
  })
}
export function ruleData(params) {
  return axios({
    url: '/school/call-records/exceed-student',
    method: 'post',
    data: params
  })
}
export function fenpeiTeacher(params) {
  return axios({
    url: '/school/classes/set-teacher',
    method: 'post',
    data: params
  })
}
export function testName(params) {
  return axios({
    url: '/school/classes/same-class',
    method: 'post',
    data: params
  })
}

export function upClass(params) {
  return axios({
    url: '/school/classes/up-class',
    method: 'post',
    data: params
  })
}
export function classTakeNameExcelOut(params, params1) {
  return axios({
    url: '/school/call-records/class-record-export?class_id=' + params + '&school_id=' + params1,
    method: 'get',
    data: params,
    // responseType: 'blob'
  })
}
export function graduation(params) {
  return axios({
    url: '/school/classes/finish',
    method: 'post',
    data: params
  })

}
export function planLessonTeacherFilter(params) {
  return axios({
    url: '/school/class-schedules/teacher',
    method: 'post',
    data: params
  })

}
export function planLessonRoomFilter(params) {
  return axios({
    url: '/school/class-schedules/check-modify',
    method: 'post',
    data: params
  })
}
export function seletedClass(id,params) {
  return axios({
    url: '/school/students/'+id+'/select-class',
    method: 'post',
    data: params
  })
}
//检测学员是否冲突

export function checkStudent(params) {
  return axios({
    url: '/school/classes/check_student_add',
    method: 'post',
    data: params
  })
}
